The HSM employs TCP for the transfer of data (see Chapter 1). It acts as a TCP server supporting multiple TCP clients configurable via the CH command. The maximum number of TCP sockets that can be supported is 64. If a TCP client attempts to establish a connection with an HSM that already has the maximum number of configured sockets active, the TCP client’s request is rejected.
The HSM supports the TCP Push function. To improve the efficiency of data transfer the TCP protocol software can buffer data into larger blocks, or divide the data into smaller blocks. This is useful for time-critical applications, such as transaction processing systems, where response time is more important than Ethernet utilisation efficiency.
The HSM always returns a response to a command using the Push function.
The HSM expects a command to be sent in the form defined in the table.
|
Field |
Size |
Format |
Description |
|
LENGTH |
2 |
Byte |
Length of the COMMAND field |
|
COMMAND |
n |
Byte |
HSM command |
|
Note: The field COMMAND should not be bracketed by X’02 - X’03 as used with the Async protocol. |
|||
Multiple commands can be sent to an HSM within one TCP transmission. Each should be of the form defined in the table.
Example:
The command format for a diagnostics command (NC) is:
X’00 X’06 X’31 X’32 X’33 X’34 X’4E X’43
where the HSM message header length is set to 04, a message header of 1234 is used, and character representation is ASCII.
When the HSM receives a command from a TCP client, the command is processed and the response returned to the TCP client. The response is of the form defined in the table.
|
Field |
Size |
Format |
Description |
|
LENGTH |
2 |
Byte |
Length of the RESPONSE field |
|
RESPONSE |
n |
Byte |
HSM response |
|
Note: The field RESPONSE is not bracketed by X’02 - X’03 (or alternative value) as used with the Async protocol. |
|||
The result of each command sent to an HSM is returned as a separate response to the TCP client. This also operates when multiple commands are sent to the HSM in a single TCP transmission.
All HSM responses are returned to the TCP client using the TCP Push function.
Example:
The response format from a diagnostics command (NC) is:
|
X’00 |
X’18 |
X’31 |
X’32 |
X’33 |
X’34 |
X’4E |
X’43 |
X’30 |
X’30 |
X’32 |
X’36 |
|
X’38 |
X’36 |
X’30 |
X’34 |
X’37 |
X’34 |
X’34 |
X’34 |
X’39 |
X’31 |
X’32 |
X’34 |
|
X’32 |
X’32 |
X’30 |
X’30 |
X’30 |
X’37 |
X’2D |
X’45 |
X’30 |
X’30 |
X’30 |
|
where the HSM message header length is set to 04, a message header of 1234 is used, and the character representation is ASCII.
The example shows the error code returned was 00 and the LMK check value returned was 2686047444912422 and the firmware installed is 0007-E000.